<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>随访记录详情</title>
  <link rel="stylesheet" href="../../lib/layui-v2.6.3/css/layui.css" media="all">
  <!-- <link rel="stylesheet" href="./../css/public.css" media="all"> -->
  <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
  </script>
</head>
<style> .layui-form-label {
  width: 150px !important;
  text-align: center !important;
}

.layui-input-block {
  margin-left: 150px !important;
}

.layui-upload-drag-self {
    background-color: #fbfdff;
    border: 1px dashed #c0ccda;
    border-radius: 6px;
    box-sizing: border-box;
    width: 148px;
    height: 148px;
    line-height: 148px;
    vertical-align: top;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    outline: 0;
    margin-right: 13px;
    float: left;
}

.layui-input-inlines-self {
    position: relative;
    margin-left: 90px;
    min-height: 36px;
    text-align: left;
}

.layui-upload-drag-self .layui-icon {
    font-size: 28px;
    color: #8c939d
}
.layui-upload-drag-self .img {
    position:relative;
    height: 148px;
    width: 148px;
}

.layui-upload-img {
    width: 148px;
    height: 148px;
    border-radius: 6px;
    margin-top: -3px;
    margin-left: -2px;
}


.handle {
    position: absolute;
    width: 148px;
    height: 100%;
    z-index: 100;
    border-radius: 6px;
    top: 0;
    background: rgba(59, 60, 61, 0.6);
    text-align: center;
}

.handle .icon-myself {
    z-index: 999;
    transition: all .3s;
    cursor: pointer;
    font-size: 25px;
    width: 25px;
    color: rgba(255, 255, 255, 0.91);
    margin: 0 4px;
}



</style>
<body>
  <div class="layuimini-container">
    <div class="layuimini-main">
      <!-- <fieldset class="table-search-fieldset"> -->
      <div style="margin: 10px 10px 10px 10px">
        <div class="layui-form layui-form-pane" action="">
          <fieldset class="layui-elem-field layui-field-title">
            <legend><a class="layui-form-mid layui-word-aux" style="font-size: 15px;" name="color-design">基本随访信息</a>
            </legend>
          </fieldset>
            <div class="layui-form-item">
              <div class="layui-inline">
                <label class="layui-form-label">所属随访次数</label>
                <div class="layui-input-block">
                  <input type="text" id="more_frCount" name="frCount" autocomplete="off" autocomplete="off"
                    class="layui-input" value="2" disabled>
                </div>
              </div>
            </div>
            
            <div class="layui-form-item">
              <div class="layui-inline">
                <label class="layui-form-label">随访日期</label>
                <div class="layui-input-block">
                  <input type="text" id="more_date" name="date" autocomplete="off" autocomplete="off"
                  class="layui-input date-time" placeholder="点击以选择" lay-verify="datetime|required" >
                </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">随访医生</label>
                <div class="layui-input-block">
                  <select name = "doctor" id = "more_doctor" lay-search lay-verify="number">
                  </select>
                </div>
              </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label" >随访种类</label>
                <div class="layui-input-inline" style="width: 30%;">
                  <input type="radio" name="type" value="0" title="常规" checked>
                  <input type="radio" name="type" value="1" title="不适随访">
                </div>
            </div>
            <div class="layui-form-item" style="width: 95%;">
              <label class="layui-form-label">患者状态评价</label>
              <div class="layui-input-block">
                <input type="radio" name="comment" value="0" title="一般" checked>
                <input type="radio" name="comment" value="1" title="很好">
                <input type="radio" name="comment" value="2" title="较差">
              </div>
            </div>
            <div class="layui-form-item" style="width: 95%;">
              <label class="layui-form-label">临床表现</label>
              <div class="layui-input-block">
                <textarea   id="more_performance" name="performance" 
                  class="layui-textarea" lay-verify="required"></textarea>
              </div>
            </div>
            <div class="layui-form-item">
              <div class="layui-inline">
                <label class="layui-form-label">电池状态</label>
                <div class="layui-input-block">
                  <input type="radio" name="batteryState" value="0" title="OK" checked>
                  <input type="radio" name="batteryState" value="1" title="ERI">
                </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">剩余电量</label>
                <div class="layui-input-block">
                  <input type="text" id="more_lqElectricity" name="lqElectricity" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="required|percent_wr">
                </div>
              </div>
            </div>
            <div class="layui-form-item" style="width: 95%;">
              <div class="layui-inline">
                <label class="layui-form-label">预估寿命</label>
                <div class="layui-input-block">
                  <input type="text" id="more_batteryLife" name="batteryLife" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="number">
                </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">起搏模式</label>
                <div class="layui-input-block">
                  <input type="text" id="more_pacemakerPattern" name="pacemakerPattern" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="required">
                </div>
              </div>
            </div>
            <div class="layui-form-item" style="width: 95%;">
              <div class="layui-inline">
                <label class="layui-form-label">电压</label>
                <div class="layui-input-block">
                  <input type="text" id="more_volts" name="volts" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="required|wireRe_f">
                </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">低限频率</label>
                <div class="layui-input-block">
                  <input type="text" id="more_minFrequency" name="minFrequency" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="required|wireRe_f">
                </div>
              </div>
            </div>
            <div class="layui-form-item" style="width: 95%;">
              <div class="layui-inline">
                <label class="layui-form-label">上限跟踪频率</label>
                <div class="layui-input-block">
                  <input type="text" id="more_maxFrequency" name="maxFrequency" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="required|wireRe_f">
                </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">下次随访日期</label>
                <div class="layui-input-block">
                  <input type="text" id="more_nextTime" name="nextTime" autocomplete="off" autocomplete="off"
                  class="layui-input date-time" placeholder="点击以选择" lay-verify="datetime|required|datetime2">
                </div>
              </div>
            </div>
            <div class="layui-form-item" style="width: 95%;">
              <label class="layui-form-label">备注</label>
              <div class="layui-input-block">
                  <textarea   id="more_note" name="note" class="layui-textarea"></textarea>
              </div>
            </div>
            <div class="layui-form-item" style="width: 95%;">
              <label class="layui-form-label">建议</label>
              <div class="layui-input-block">
                <textarea   id="more_suggest" name="suggest" class="layui-textarea"></textarea>
              </div>
            </div>
            <div class="layui-form-item" id="imgItem">
                <label class="layui-form-label">上传图片：</label>
                <input type="text" id="more_image" name="image" autocomplete="off" autocomplete="off"
                class="layui-input layui-hide" >
                <button type="button" id="importModel" class="layui-hide">图片导入</button>
                <div class="layui-input-inlines-self" id="imgItemInfo">
                    <div class="layui-upload-drag-self" id="importImg0">
                        <div id="imgDivs0">
                            <i class="layui-icon" id="uploadIcon0"> &#xe624; </i>
                        </div>
                        <div class="img layui-hide" id="uploadDemoView0">
                            <img class="layui-upload-img" id="imgs0" src="">
                            <div class="handle layui-hide" id="handle0">
                                <i class="layui-icon layui-icon-search icon-myself" id="preImg0"></i>
                                <i class="layui-icon layui-icon-delete icon-myself" id="delImg0"></i>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
          <fieldset class="layui-elem-field layui-field-title" style="margin-top:45px">
            <legend><a class="layui-form-mid layui-word-aux" style="font-size: 15px;" name="color-design">电极信息</a>
            </legend>
          </fieldset>

          <fieldset class="layui-elem-field layui-hide" id="more_wirePosition_1">
            <legend style="font-size: 15px;color: gray;">右心房</legend>
            <div class="layui-field-box">
              <div class="layui-form-item">
                <div class="layui-inline">
                  <label class="layui-form-label">阈值(v)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_thresholds_1" name="thresholds_1" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rawirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">脉宽(ms)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_pulsewidth_1" name="pulsewidth_1" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rawirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">P/R波(mv)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_prwave_1" name="prwave_1" autocomplete="off_1" autocomplete="off"
                      class="layui-input" lay-verify="rawirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">起搏阻抗(Ω)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_pacingImpedance_1" name="pacingImpedance_1" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rawirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">起搏百分比(%)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_pacingPercent_1" name="pacingPercent_1" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rawirecheck|percent_wr">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">感知百分比(%)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_perceptualPercent_1" name="perceptualPercent_1" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rawirecheck|percent_wr">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">除颤阻抗(Ω)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_defibrillationImpedance_1" name="defibrillationImpedance_1" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rawirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">输出电压(V)/脉宽(ms)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_tdpw_1" name="tdpw_1" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rawirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">感知灵敏度(mv)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_perceptualSensitivity_1" name="perceptualSensitivity_1" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rawirecheck|wireRe_f">
                  </div>
                </div>
              </div>
              <div class="layui-form-item" style="width: 95%;">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                  <textarea id="more_note_1" name="note_1" class="layui-textarea"></textarea>
                </div>
              </div>
            </div>
          </fieldset>
          <fieldset class="layui-elem-field layui-hide" id="more_wirePosition_2">
            <legend style="font-size: 15px;color: gray;">右心室</legend>
            <div class="layui-field-box">
              <div class="layui-form-item">
                <div class="layui-inline">
                  <label class="layui-form-label">阈值(v)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_thresholds_2" name="thresholds_2" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">脉宽(ms)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_pulsewidth_2" name="pulsewidth_2" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">P/R波(mv)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_prwave_2" name="prwave_2" autocomplete="off_2" autocomplete="off"
                      class="layui-input" lay-verify="rvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">起搏阻抗(Ω)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_pacingImpedance_2" name="pacingImpedance_2" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">起搏百分比(%)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_pacingPercent_2" name="pacingPercent_2" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rvwirecheck|percent_wr">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">感知百分比(%)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_perceptualPercent_2" name="perceptualPercent_2" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rvwirecheck2|percent_wr">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">除颤阻抗(Ω)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_defibrillationImpedance_2" name="defibrillationImpedance_2" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">输出电压(V)/脉宽(ms)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_tdpw_2" name="tdpw_2" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">感知灵敏度(mv)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_perceptualSensitivity_2" name="perceptualSensitivity_2" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="rvwirecheck|wireRe_f">
                  </div>
                </div>
              </div>
              <div class="layui-form-item" style="width: 95%;">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                  <textarea id="more_note_2" name="note_2" class="layui-textarea"></textarea>
                </div>
              </div>
            </div>
          </fieldset>
          <fieldset class="layui-elem-field layui-hide" id="more_wirePosition_3">
            <legend style="font-size: 15px;color: gray;">左心室</legend>
            <div class="layui-field-box">
              <div class="layui-form-item">
                <div class="layui-inline">
                  <label class="layui-form-label">阈值(v)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_thresholds_3" name="thresholds_3" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="lvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">脉宽(ms)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_pulsewidth_3" name="pulsewidth_3" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="lvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">P/R波(mv)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_prwave_3" name="prwave_3" autocomplete="off_3" autocomplete="off"
                      class="layui-input" lay-verify="lvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">起搏阻抗(Ω)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_pacingImpedance_3" name="pacingImpedance_3" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="lvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">起搏百分比(%)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_pacingPercent_3" name="pacingPercent_3" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="lvwirecheck|percent_wr">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">感知百分比(%)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_perceptualPercent_3" name="perceptualPercent_3" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="lvwirecheck|percent_wr">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">除颤阻抗(Ω)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_defibrillationImpedance_3" name="defibrillationImpedance_3" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="lvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">输出电压(V)/脉宽(ms)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_tdpw_3" name="tdpw_3" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="lvwirecheck|wireRe_f">
                  </div>
                </div>
                <div class="layui-inline">
                  <label class="layui-form-label">感知灵敏度(mv)</label>
                  <div class="layui-input-block">
                    <input type="text" id="more_perceptualSensitivity_3" name="perceptualSensitivity_3" autocomplete="off" autocomplete="off"
                      class="layui-input" lay-verify="lvwirecheck|wireRe_f">
                  </div>
                </div>
              </div>
              <div class="layui-form-item" style="width: 95%;">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                  <textarea id="more_note_3" name="note_3" class="layui-textarea"></textarea>
                </div>
              </div>
            </div>
          </fieldset>
          <fieldset class="layui-elem-field layui-field-title" style="margin-top:45px">
            <legend><a class="layui-form-mid layui-word-aux" style="font-size: 15px;" name="color-design">附加随访信息</a>
            </legend>
          </fieldset>
          <div class="layui-form-item" style="height: 8%;">
            <label class="layui-form-label">附加信息</label>
            <div class="layui-input-block" >
              <input type="checkbox" name="more_info" value="1" title="心脏超声" lay-skin="primary" id = "more_heartsound"
                lay-filter="more_info" class = "dis-wire">
            </div>
          </div>
          <fieldset class="layui-elem-field layui-hide" id="more_heartUltrasound">
            <legend style="font-size: 15px;color: gray;">心脏超声</legend>
            <div class="layui-field-box">
              <div class="layui-form-item" id="heart_imgItem">
                <label class="layui-form-label">上传图片：</label>
                <input type="text" id="heart_more_image" name="image_1" autocomplete="off" autocomplete="off"
                class="layui-input layui-hide" >
                <button type="button" id="heart_importModel" class="layui-hide">图片导入</button>
                <div class="layui-input-inlines-self" id="heart_imgItemInfo">
                    <div class="layui-upload-drag-self" id="heart_importImg0">
                        <div id="heart_imgDivs0">
                            <i class="layui-icon" id="heart_uploadIcon0"> &#xe624; </i>
                        </div>
                        <div class="img layui-hide" id="heart_uploadDemoView0">
                            <img class="layui-upload-img" id="heart_imgs0" src="">
                            <div class="handle layui-hide" id="heart_handle0">
                                <i class="layui-icon layui-icon-search icon-myself" id="heart_preImg0"></i>
                                <i class="layui-icon layui-icon-delete icon-myself" id="heart_delImg0"></i>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
              <div class="layui-form-item">
                  <label class="layui-form-label" >心脏大小变化</label>
                  <div class="layui-input-block">
                    <input type="radio" name = "heartSize" value="1" title="不变" checked>
                    <input type="radio" name = "heartSize" value="2" title="变大" >
                    <input type="radio" name = "heartSize" value="3" title="变小" >
                  </div>
              </div>
              <div class="layui-form-item">
              <div class="layui-inline">
                <label class="layui-form-label">LA</label>
                <div class="layui-input-block">
                  <input type="text" id="la" name="la" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="hrcheck|wireRe_f">
                </div>
              </div>
              <div class="layui-inline">
                  <label class="layui-form-label" >LA状态</label>
                  <div class="layui-input-block">
                    <input type="radio" name = "las" value="1" title="正常" checked>
                    <input type="radio" name = "las" value="2" title="异常" >
                  </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">LV</label>
                <div class="layui-input-block">
                  <input type="text" id="lv" name="lv" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="hrcheck|wireRe_f"> 
                </div>
              </div>
              <div class="layui-inline">
                  <label class="layui-form-label" >LV状态</label>
                  <div class="layui-input-block">
                    <input type="radio" name = "lvs" value="1" title="正常" checked>
                    <input type="radio" name = "lvs" value="2" title="异常" >
                  </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">RA</label>
                <div class="layui-input-block">
                  <input type="text" id="ra" name="ra" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="hrcheck|wireRe_f">
                </div>
              </div>
              <div class="layui-inline">
                  <label class="layui-form-label" >RA状态</label>
                  <div class="layui-input-block">
                    <input type="radio" name = "ras" value="1" title="正常" checked>
                    <input type="radio" name = "ras" value="2" title="异常" >
                  </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">RV</label>
                <div class="layui-input-block">
                  <input type="text" id="rv" name="rv" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="hrcheck|wireRe_f">
                </div>
              </div>
              <div class="layui-inline">
                  <label class="layui-form-label" >RV状态</label>
                  <div class="layui-input-block">
                    <input type="radio" name = "rvs" value="1" title="正常" checked>
                    <input type="radio" name = "rvs" value="2" title="异常" >
                  </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">FS(%)</label>
                <div class="layui-input-block">
                  <input type="text" id="fs" name="fs" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="hrcheck|percent_wr">
                </div>
              </div>
              <div class="layui-inline">
                  <label class="layui-form-label" >FS状态</label>
                  <div class="layui-input-block">
                    <input type="radio" name = "fss" value="1" title="正常" checked>
                    <input type="radio" name = "fss" value="2" title="异常" >
                  </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">EF(%)</label>
                <div class="layui-input-block">
                  <input type="text" id="ef" name="ef" autocomplete="off" autocomplete="off"
                    class="layui-input" lay-verify="hrcheck|percent_wr">
                </div>
              </div>
            </div>
            <div class="layui-form-item" style="width: 95%">
              <div class="layui-inline">
                <label class="layui-form-label" >EF状态</label>
                <div class="layui-input-block">
                  <input type="radio" name = "efs" value="1" title="正常" checked>
                  <input type="radio" name = "efs" value="2" title="异常" >
                </div>
              </div>
            </div>
            <div class="layui-form-item" style="width: 95%;">
              <label class="layui-form-label">备注</label>
              <div class="layui-input-block">
                <textarea id="heart_note" name="note_4"  class="layui-textarea"></textarea>
              </div>
            </div>
            </div>
          </fieldset>
            <div style="position: absolute; right: 17px;">
              <button id="more_closebtn" type="button" class="layui-btn" style="margin-right: 0;" lay-submit lay-filter="follow_record_submit">保存提交</button>
            </div>
        </div>
      </div>
      <!-- </fieldset> -->
    </div>
  </div>
  <script src="../../lib/layui-v2.6.3/layui.js"></script>
  <script src="../../js/basic-load.js" charset="utf-8"></script>
    <script>
    layui.use(['form', 'layer',  'upload'], function () {
        var $ = layui.jquery,
            layer = layui.layer,
            form = layui.form,
            upload = layui.upload;

        //删除图片
        $(document).on('click', '[id^=delImg]', function () {
            var importImgF = $('#imgItemInfo').find('div:first');//importImg0、importImg1、importImg2
            var empt = $(this).parent().parent().parent();//importImg0、importImg1、importImg2
            var nextImgSrc = $(this).parent().parent().parent().next().find('img').attr('src');//src
            //判断当前DIV后面的div的url是否为空
            if (!nextImgSrc) {
                //判断是否为第一个
                if (importImgF.attr('id') === empt.attr('id')) {
                    //-是 ，清空第一个 最后面的删除
                    //图片url清空
                    empt.find('img').attr('src','');
                    $(this).parent().parent().addClass('layui-hide');
                    importImgF.find('i:first').removeClass('layui-hide');
                    count--;
                    $('#' + 'importImg' + count).remove();
                } else {
                    // -否，删除当前
                    empt.remove();
                }
            } else {
                //如果有值删除当前div
                empt.remove();
            }
            return false;
        });

        //图片预览
        $(document).on('click', '[id^=preImg]', function () {
            var iHtml = "<img src='" + $(this).parent().parent().find('img:first').attr('src') + "' style='width: 100%; height: 100%;'/>";
            layer.open({
                type: 1,
                shade: 0.3,
                title: false, //不显示标题
                skin:'layui-layer-nobg',
                offset:'10px',
                shadeClose: true,
                area: ['auto'],
                content: iHtml //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响
            });
            return false;
        });

        //图片绑定鼠标悬浮
        $(document).on("mouseenter", ".img", function () {
            //鼠标悬浮
            $(this).find('div:first').removeClass('layui-hide');
        }).on("mouseleave", ".img", function () {
            //鼠标离开
            $(this).find('div:first').addClass('layui-hide');
        });


        var imgsId,
            uploadDemoViewId,
            uploadIconId;

        $(document).on('click', '[id^=imgDivs]', function () {
            //给id赋值
            uploadIconId = $(this).find('i').attr('id');
            uploadDemoViewId = $(this).next().attr('id');
            imgsId = $(this).next().find('img').attr('id');
            $('#importModel').click();
        });
        var count = 1;

        upload.render({
            elem: '#importModel'
            , multiple: false
            , url: `${url_basic}/pic/upload` //改成您自己的上传接口
            , done: function (res) {
                if (res.status != 'done') {
                    return layer.msg('上传失败')
                }
                $('#' + imgsId).attr('src', res.name);
                $('#' + uploadDemoViewId).removeClass('layui-hide');
                $('#' + uploadIconId).addClass('layui-hide');
                $("#more_image").val(res.name)
                if(count<1){
                  $('#imgItemInfo').append(
                    '<div class="layui-upload-drag-self" id="importImg' + count + '">' +
                    '<div id="imgDivs' + count + '">' +
                    '<i class="layui-icon" id="uploadIcon' + count + '"> &#xe624; </i>' +
                    '</div>' +
                    '<div class="img layui-hide" id="uploadDemoView' + count + '">' +
                    '<img class="layui-upload-img" id="imgs' + count + '" src="">' +
                    '<div class="handle layui-hide" id="handle' + count + '">' +
                    '<i class="layui-icon layui-icon-search icon-myself " id="preImg' + count + '"></i>' +
                    '<i class="layui-icon layui-icon-delete icon-myself " id="delImg' + count + '"></i>' +
                    '</div>' + '</div>' + '</div>'
                  );
                }
                count++;
            }
        });
        form.on('submit(getUrls-form-submit)', function (data) {
            //使用data.field获取不到值
            var imgs = $('[id^=imgs]');
            var imgArray=[];
            imgs.each(function () {
                var url=$(this).attr('src');
                //滤空
                if (url){
                    imgArray.push(url);
                }
            });
            alert(JSON.stringify(imgArray));
            return false;
        });
    });
  </script>
      <script>
        layui.use(['form', 'layer',  'upload'], function () {
            var $ = layui.jquery,
                layer = layui.layer,
                form = layui.form,
                upload = layui.upload;
    
            //删除图片
            $(document).on('click', '[id^=heart_delImg]', function () {
                var importImgF = $('#heart_imgItemInfo').find('div:first');//importImg0、importImg1、importImg2
                var empt = $(this).parent().parent().parent();//importImg0、importImg1、importImg2
                var nextImgSrc = $(this).parent().parent().parent().next().find('img').attr('src');//src
                //判断当前DIV后面的div的url是否为空
                if (!nextImgSrc) {
                    //判断是否为第一个
                    if (importImgF.attr('id') === empt.attr('id')) {
                        //-是 ，清空第一个 最后面的删除
                        //图片url清空
                        empt.find('img').attr('src','');
                        $(this).parent().parent().addClass('layui-hide');
                        importImgF.find('i:first').removeClass('layui-hide');
                        count--;
                        $('#heart_' + 'importImg' + count).remove();
                    } else {
                        // -否，删除当前
                        empt.remove();
                    }
                } else {
                    //如果有值删除当前div
                    empt.remove();
                }
                return false;
            });
    
            //图片预览
            $(document).on('click', '[id^=heart_preImg]', function () {
                var iHtml = "<img src='" + $(this).parent().parent().find('img:first').attr('src') + "' style='width: 100%; height: 100%;'/>";
                layer.open({
                  type: 1,
                  shade: 0.3,
                  title: false, //不显示标题
                  skin:'layui-layer-nobg',
                  offset:'10px',
                  shadeClose: true,
                  area: ['auto'],
                  content: iHtml //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响
                });
                return false;
            });
    
            //图片绑定鼠标悬浮
            $(document).on("mouseenter", ".img", function () {
                //鼠标悬浮
                $(this).find('div:first').removeClass('layui-hide');
            }).on("mouseleave", ".img", function () {
                //鼠标离开
                $(this).find('div:first').addClass('layui-hide');
            });
    
    
            var imgsId,
                uploadDemoViewId,
                uploadIconId;
    
            $(document).on('click', '[id^=heart_imgDivs]', function () {
                //给id赋值
                uploadIconId = $(this).find('i').attr('id');
                uploadDemoViewId = $(this).next().attr('id');
                imgsId = $(this).next().find('img').attr('id');
                $('#heart_importModel').click();
            });
            var count = 1;
    
            upload.render({
                elem: '#heart_importModel'
                , multiple: false
                , url: `${url_basic}/pic/upload` //改成您自己的上传接口
                , done: function (res) {
                    if (res.status != 'done') {
                        return layer.msg('上传失败')
                    }
                    $('#' + imgsId).attr('src', res.name);
                    $('#' + uploadDemoViewId).removeClass('layui-hide');
                    $('#' + uploadIconId).addClass('layui-hide');
                    $("#heart_more_image").val(res.name)
                    if(count<1){
                      $('#heart_imgItemInfo').append(
                        '<div class="layui-upload-drag-self" id="heart_importImg' + count + '">' +
                        '<div id="heart_imgDivs' + count + '">' +
                        '<i class="layui-icon" id="heart_uploadIcon' + count + '"> &#xe624; </i>' +
                        '</div>' +
                        '<div class="img layui-hide" id="heart_uploadDemoView' + count + '">' +
                        '<img class="layui-upload-img" id="heart_imgs' + count + '" src="">' +
                        '<div class="handle layui-hide" id="heart_handle' + count + '">' +
                        '<i class="layui-icon layui-icon-search icon-myself " id="heart_preImg' + count + '"></i>' +
                        '<i class="layui-icon layui-icon-delete icon-myself " id="heart_delImg' + count + '"></i>' +
                        '</div>' + '</div>' + '</div>'
                      );
                    }
                    count++;
                }
            });
            form.on('submit(getUrls-form-submit)', function (data) {
                //使用data.field获取不到值
                var imgs = $('[id^=heart_imgs]');
                var imgArray=[];
                imgs.each(function () {
                    var url=$(this).attr('src');
                    //滤空
                    if (url){
                        imgArray.push(url);
                    }
                });
                alert(JSON.stringify(imgArray));
                return false;
            });
        });
      </script>
  <script>
    var position_data_follow = {"1":"raWireRecord","2":"rvWireRecord","3":"lvWireRecord"}
    var data_origin_follow = {}
    var mrIdStore = 0
    var frCountStore = 0
    data_origin_follow["position_data"] = position_data_follow
    var raInstore
    var rvInstore
    var lvInstore
    /**
     * 
     * 初始化下拉栏的表单
     * 
     * 
    */
    function setList(){
      /**
       * 
       * 初始化医生下拉栏
       * 
       * */
      layui.$.ajax({
          url: `${url_basic}/doctor/all?onlySelect=id,name`,
          type: "POST",
          contentType: 'application/json',
          success: function (data, textStatus) {
            if (data.code == 0) {
              document.getElementById("more_doctor").innerHTML = "";
              for (let index = 0; index < data.data.length; index++) {
                const element = data.data[index];
                var newOption = document.createElement("option");
                newOption.text = element.name;
                newOption.value = element.id;
                document.getElementById("more_doctor").add(newOption);
              }
              layui.form.render("select");
              return true;
            }
            else {
              layer.msg('失败，原因：' + data.msg);
              return false;
            }
          },
          error: function (xhr, errorText, errorType) {
            layer.msg('更新清单失败（与服务器连接失败）');
          },
          dataType: "json"
        })
    }
    var method = "新增" // 也可能是"修改"，由传参决定
    layui.use(['laydate', 'form', 'jquery', 'table'], function () {
      var laydate = layui.laydate,
        form = layui.form,
        table = layui.table,
        $ = layui.$;
      /**
       * 
       * 设置layui时间选择器
       * 
       * */
      var datatime_elems = document.getElementsByClassName("date-time")
      for (var i = 0; i < datatime_elems.length; i++) {
          laydate.render({
              elem: datatime_elems[i]
              , type: 'datetime'
          });
      }
      /**
       * 
       * 设置layui选项卡
       * 
       */
      setList();

      //执行一个laydate实例
      laydate.render({
        elem: '#publication_data' //指定元素
      });
      form.verify({
        rawirecheck:function (value) {
          if (raInstore) {
            if(value.length<1)
            {return '请输入右心房电极相关必填信息';}
          }
        },
        rvwirecheck:function (value) {
          if (rvInstore) {
            if(value.length<1)
            {return '请输入右心室电极相关必填信息';}
          }
        },
        lvwirecheck:function (value) {
          if (lvInstore) {
            if(value.length<1)
            {return '请输入左心室电极相关必填信息';}
          }
        }
        , hrcheck:function (value) {
            var checked=document.getElementById("more_heartsound"); 
            if(checked.checked){
              if(value.length<1)
              {return '请输入心脏超声相关必填消息';}
            }
          }
        //输入浮点数的限制
        ,wireRe_f:[
          /^[0-9][0-9]*([\.][0-9]{1,2})?$|^(\d{0})?$/
          , '请输入正确的小数格式'
          ]
        //输入不大于100的百分比的限制
        ,percent_wr:function (value) {
          var regu = /^[0-9][0-9]*([\.][0-9]{1,2})?$|^(\d{0})?$/
          if (regu.test(value)) {
            if (value<0||value>100) {
              return '请输入0~100以内的数值，可包含小数部分';
            }
          }
          else{
            return '请输入0~100以内的数值，可包含小数部分';
          }
        }
          //日期
        ,datetime2:function(){
            var date1=document.getElementById("more_date").value;
            var date2=document.getElementById("more_nextTime").value;
            if(date1>date2){
              return '下次随访时间应该晚于植入时间'
            }
          }

      });

      /**
       * 
       * 额外组件的添加
       * 
       */

      form.on('checkbox(more_info)', function (data) {
        //console.log(data.elem.checked); //是否被选中，true或者false
        //console.log(data.value); //复选框value值，也可以通过data.elem.value得到
        if (data.elem.checked) {
          $("#more_heartUltrasound").removeClass("layui-hide")
        }else{
          $("#more_heartUltrasound").addClass("layui-hide")
        }
      });

      var followRecordContent = ['id','mrId','frCount','image','date','doctor','type','performance','batteryState','batteryLife','pacemakerPattern','minFrequency','maxFrequency','note','suggest','volts','lqElectricity','comment'];
      var followRecordWirecontent_3 = ['frId_3','position_3','thresholds_3','pulsewidth_3','prwave_3','pacingImpedance_3','pacingPercent_3','perceptualPercent_3','defibrillationImpedance_3','tdpw_3','perceptualSensitivity_3','note_3']
      var followRecordWirecontent_2 = ['frId_2','position_2','thresholds_2','pulsewidth_2','prwave_2','pacingImpedance_2','pacingPercent_2','perceptualPercent_2','defibrillationImpedance_2','tdpw_2','perceptualSensitivity_2','note_2']
      var followRecordWirecontent_1 = ['frId_1','position_1','thresholds_1','pulsewidth_1','prwave_1','pacingImpedance_1','pacingPercent_1','perceptualPercent_1','defibrillationImpedance_1','tdpw_1','perceptualSensitivity_1','note_1']
      var heartUltrasoundContent = ['id','frId','image','heartSize','la','las','lv','lvs','ra','ras','rv','rvs','fs','fss','ef','efs']

      //监听提交
      form.on('submit(follow_record_submit)', function (data) {
        for (var key in data.field) {
          if (data.field[key] === '')
            delete data.field[key]
        }
        //console.log(data.field)
        if(method == '新增'){
          delete data.field["id"]
        }
        var followRecordAll = {};
        data.field["id"] = 0
        data.field["mrId"] = mrIdStore
        followRecordAll["nextTime"] = data.field["nextTime"]
        followRecordAll["followRecord"] = {}
        $.each(data_origin_follow.position_data,function(key,val){
          if(data_origin_follow.position_set[key]){
            followRecordAll[val] = {}
          }
        })
        var heart_bool = $("#more_heartsound").prop("checked")
        if(heart_bool){
          followRecordAll["heartUltrasound"] = {}
        }

        $.each(data.field,function (key,val){
          if(followRecordContent.includes(key)){
            followRecordAll.followRecord[key] = val;
          }
          if(data_origin_follow.position_set[1]){
            if(followRecordWirecontent_1.includes(key)){
              followRecordAll.raWireRecord[key.slice(0,-2)] = val; 
            }
          }
          if(data_origin_follow.position_set[2]){
            if(followRecordWirecontent_2.includes(key)){
              followRecordAll.rvWireRecord[key.slice(0,-2)] = val; 
            }
          }
          if(data_origin_follow.position_set[3]){
            if(followRecordWirecontent_3.includes(key)){
              followRecordAll.lvWireRecord[key.slice(0,-2)] = val; 
            }
          }
          if(heart_bool){
            if(heartUltrasoundContent.includes(key)){
              followRecordAll.heartUltrasound[key] = val;
            }
          }
        })
        followRecordAll.followRecord['state'] = 1
        if(data_origin_follow.position_set[1]){
          followRecordAll.raWireRecord["id"] = 0
        }
        if(data_origin_follow.position_set[2]){
          followRecordAll.rvWireRecord["id"] = 0
        }
        if(data_origin_follow.position_set[3]){
          followRecordAll.lvWireRecord["id"] = 0
        }
        if(heart_bool){
          followRecordAll.heartUltrasound["note"] = data.field["note_4"]
          if("image_1" in data.field){
            followRecordAll.heartUltrasound["image"] = data.field["image_1"]
          }
        }
        //console.log('发送用户随访信息，发送数据如下：')
        //console.log(JSON.stringify(followRecordAll))
        $.ajax({
          url: `${url_basic}/medicalRecords/followRecord`,
          type: "POST",
          data: JSON.stringify(followRecordAll),
          contentType: 'application/json',
          success: function (data, textStatus) {
            if (data.code == 0) {
              layer.msg('成功', { time: 0.5 * 1000 }, function () {
                // 关闭弹出层
                var iframeIndex = parent.layer.getFrameIndex(window.name);
                parent.layer.close(iframeIndex);
                parent.location.reload();
              });
              return true;
            }
            else {
              layer.msg('失败，原因：' + data.msg);
              return false;
            }
          },
          error: function (xhr, errorText, errorType) {
            //console.log(errorType)
            layer.msg('修改失败（与服务器连接失败）');
          },
          dataType: "json"
        })
        return false;
      });
    });

    Date.prototype.format = function(fmt) { 
      var o = { 
          "M+" : this.getMonth()+1,                 //月份 
          "d+" : this.getDate(),                    //日 
          "h+" : this.getHours(),                   //小时 
          "m+" : this.getMinutes(),                 //分 
          "s+" : this.getSeconds(),                 //秒 
          "q+" : Math.floor((this.getMonth()+3)/3), //季度 
          "S"  : this.getMilliseconds()             //毫秒 
      }; 
      if(/(y+)/.test(fmt)) {
              fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); 
      }
      for(var k in o) {
          if(new RegExp("("+ k +")").test(fmt)){
              fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
          }
      }
      return fmt; 
    }

    function setDataFollow(data,privilege) {
      this_privilege = privilege
      mrIdStore = data.id
      var positionSet = {"1":data.raIn, "2":data.rvIn, "3":data.lvIn}
      data_origin_follow["position_set"] = positionSet
      $.each(positionSet,function(key,val){
        if(val){
          $(`#more_wirePosition_${key}`).removeClass('layui-hide')
        }
      })
      $("#more_frCount").val(data.followCounts + 1)
      $("#more_date").val((new Date()).format("yyyy-MM-dd hh:mm:ss"))
      //确认植入位置
      raInstore=data.raIn
      rvInstore=data.rvIn
      lvInstore=data.lvIn

      layui.form.render()
    };



    function resetPassword(){
      document.getElementById('passwordBlock').style.visibility = "visible"
    }
  </script>
</body>

</html>